home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / comm / tcp / AmiTCPsdk_40.lha / AmiTCP-4.0 / netinclude / clib / socket_inlines.h < prev    next >
C/C++ Source or Header  |  1994-10-03  |  1KB  |  49 lines

  1. #ifndef CLIB_SOCKET_INLINES_H
  2. #define CLIB_SOCKET_INLINES_H \
  3.        "$Id: socket_inlines.h,v 4.1 1994/10/03 20:54:51 ppessi Exp $"
  4. /*
  5.  *    Some inlines to replace common stubs 
  6.  *
  7.  *      Copyright © 1994 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. #define select        _static_inline_select
  13. #define inet_ntoa     _static_inline_inet_ntoa
  14. #define inet_makeaddr _static_inline_inet_makeaddr
  15. #define inet_lnaof    _static_inline_inet_lnaof
  16. #define inet_netof    _static_inline_inet_netof
  17.  
  18. static int __inline 
  19. select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exeptfds,
  20.      struct timeval *timeout)
  21. {
  22.   /* call WaitSelect with NULL signal mask pointer */
  23.   return WaitSelect(nfds, readfds, writefds, exeptfds, timeout, NULL);
  24. }
  25.  
  26. static char * __inline
  27. inet_ntoa(struct in_addr addr) 
  28. {
  29.   return Inet_NtoA(addr.s_addr);
  30. }
  31. static struct in_addr __inline
  32. inet_makeaddr(int net, int host)
  33. {
  34.   struct in_addr addr;
  35.   addr.s_addr = Inet_MakeAddr(net, host);
  36.   return addr;
  37. }
  38. static unsigned long __inline
  39. inet_lnaof(struct in_addr addr) 
  40. {
  41.   return Inet_LnaOf(addr.s_addr);
  42. }
  43. static unsigned long  __inline
  44. inet_netof(struct in_addr addr)
  45. {
  46.   return Inet_NetOf(addr.s_addr);
  47. }
  48. #endif /* CLIB_SOCKET_INLINES_H */
  49.